﻿///////////////////////////////////////////////////////////////
// This is generated code. 
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 3.1
// Code is generated on: Wednesday, June 29, 2011 7:51:30 PM
// Code is generated using templates: SD.TemplateBindings.SharedTemplates.NET20
// Templates vendor: Solutions Design.
// Templates version: 
//////////////////////////////////////////////////////////////
using System;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace MECPSDB.HelperClasses
{
	
	// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
	// __LLBLGENPRO_USER_CODE_REGION_END
	
	/// <summary>Singleton implementation of the FieldInfoProvider. This class is the singleton wrapper through which the actual instance is retrieved.</summary>
	/// <remarks>It uses a single instance of an internal class. The access isn't marked with locks as the FieldInfoProviderBase class is threadsafe.</remarks>
	internal static class FieldInfoProviderSingleton
	{
		#region Class Member Declarations
		private static readonly IFieldInfoProvider _providerInstance = new FieldInfoProviderCore();
		#endregion

		/// <summary>Dummy static constructor to make sure threadsafe initialization is performed.</summary>
		static FieldInfoProviderSingleton()
		{
		}

		/// <summary>Gets the singleton instance of the FieldInfoProviderCore</summary>
		/// <returns>Instance of the FieldInfoProvider.</returns>
		public static IFieldInfoProvider GetInstance()
		{
			return _providerInstance;
		}
	}

	/// <summary>Actual implementation of the FieldInfoProvider. Used by singleton wrapper.</summary>
	internal class FieldInfoProviderCore : FieldInfoProviderBase
	{
		/// <summary>Initializes a new instance of the <see cref="FieldInfoProviderCore"/> class.</summary>
		internal FieldInfoProviderCore()
		{
			Init();
		}

		/// <summary>Method which initializes the internal datastores.</summary>
		private void Init()
		{
			this.InitClass( (9 + 0));
			InitMatbrandEntityInfos();
			InitMaterialEntityInfos();
			InitMatgroupEntityInfos();
			InitMatimgEntityInfos();
			InitMatumEntityInfos();
			InitSystemuserEntityInfos();
			InitVendorEntityInfos();
			InitVenptermEntityInfos();
			InitVwMaterialEntityInfos();

			this.ConstructElementFieldStructures(InheritanceInfoProviderSingleton.GetInstance());
		}

		/// <summary>Inits MatbrandEntity's FieldInfo objects</summary>
		private void InitMatbrandEntityInfos()
		{
			this.AddFieldIndexEnumForElementName(typeof(MatbrandFieldIndex), "MatbrandEntity");
			this.AddElementFieldInfo("MatbrandEntity", "BrandCode", typeof(System.String), true, false, false, false,  (int)MatbrandFieldIndex.BrandCode, 10, 0, 0);
			this.AddElementFieldInfo("MatbrandEntity", "BrandDescription", typeof(System.String), false, false, false, true,  (int)MatbrandFieldIndex.BrandDescription, 50, 0, 0);
			this.AddElementFieldInfo("MatbrandEntity", "LastModified", typeof(Nullable<System.DateTime>), false, false, false, true,  (int)MatbrandFieldIndex.LastModified, 0, 0, 0);
			this.AddElementFieldInfo("MatbrandEntity", "Rem", typeof(System.String), false, false, false, true,  (int)MatbrandFieldIndex.Rem, 1073741824, 0, 0);
		}
		/// <summary>Inits MaterialEntity's FieldInfo objects</summary>
		private void InitMaterialEntityInfos()
		{
			this.AddFieldIndexEnumForElementName(typeof(MaterialFieldIndex), "MaterialEntity");
			this.AddElementFieldInfo("MaterialEntity", "AccountIdFk", typeof(System.String), false, false, false, true,  (int)MaterialFieldIndex.AccountIdFk, 50, 0, 0);
			this.AddElementFieldInfo("MaterialEntity", "BrandCodeFk", typeof(System.String), false, true, false, false,  (int)MaterialFieldIndex.BrandCodeFk, 10, 0, 0);
			this.AddElementFieldInfo("MaterialEntity", "CritLevel", typeof(System.Single), false, false, false, false,  (int)MaterialFieldIndex.CritLevel, 0, 0, 24);
			this.AddElementFieldInfo("MaterialEntity", "InActive", typeof(System.Boolean), false, false, false, false,  (int)MaterialFieldIndex.InActive, 0, 0, 0);
			this.AddElementFieldInfo("MaterialEntity", "InvLevel", typeof(System.Single), false, false, false, false,  (int)MaterialFieldIndex.InvLevel, 0, 0, 24);
			this.AddElementFieldInfo("MaterialEntity", "LastModified", typeof(System.DateTime), false, false, false, false,  (int)MaterialFieldIndex.LastModified, 0, 0, 0);
			this.AddElementFieldInfo("MaterialEntity", "MatDescription", typeof(System.String), false, false, false, false,  (int)MaterialFieldIndex.MatDescription, 80, 0, 0);
			this.AddElementFieldInfo("MaterialEntity", "MaterialCode", typeof(System.String), true, false, false, false,  (int)MaterialFieldIndex.MaterialCode, 25, 0, 0);
			this.AddElementFieldInfo("MaterialEntity", "MatGrpCodeFk", typeof(System.String), false, true, false, false,  (int)MaterialFieldIndex.MatGrpCodeFk, 10, 0, 0);
			this.AddElementFieldInfo("MaterialEntity", "Remarks", typeof(System.String), false, false, false, true,  (int)MaterialFieldIndex.Remarks, 1073741824, 0, 0);
			this.AddElementFieldInfo("MaterialEntity", "ReOrderLevel", typeof(System.Single), false, false, false, false,  (int)MaterialFieldIndex.ReOrderLevel, 0, 0, 24);
			this.AddElementFieldInfo("MaterialEntity", "UmCodeFk", typeof(System.String), false, true, false, false,  (int)MaterialFieldIndex.UmCodeFk, 10, 0, 0);
			this.AddElementFieldInfo("MaterialEntity", "WdserialNo", typeof(System.Boolean), false, false, false, false,  (int)MaterialFieldIndex.WdserialNo, 0, 0, 0);
		}
		/// <summary>Inits MatgroupEntity's FieldInfo objects</summary>
		private void InitMatgroupEntityInfos()
		{
			this.AddFieldIndexEnumForElementName(typeof(MatgroupFieldIndex), "MatgroupEntity");
			this.AddElementFieldInfo("MatgroupEntity", "LastModified", typeof(Nullable<System.DateTime>), false, false, false, true,  (int)MatgroupFieldIndex.LastModified, 0, 0, 0);
			this.AddElementFieldInfo("MatgroupEntity", "MatGrpCode", typeof(System.String), true, false, false, false,  (int)MatgroupFieldIndex.MatGrpCode, 10, 0, 0);
			this.AddElementFieldInfo("MatgroupEntity", "MatGrpDescription", typeof(System.String), false, false, false, false,  (int)MatgroupFieldIndex.MatGrpDescription, 50, 0, 0);
			this.AddElementFieldInfo("MatgroupEntity", "Remarks", typeof(System.String), false, false, false, true,  (int)MatgroupFieldIndex.Remarks, 1073741824, 0, 0);
		}
		/// <summary>Inits MatimgEntity's FieldInfo objects</summary>
		private void InitMatimgEntityInfos()
		{
			this.AddFieldIndexEnumForElementName(typeof(MatimgFieldIndex), "MatimgEntity");
			this.AddElementFieldInfo("MatimgEntity", "MatCode", typeof(System.String), true, true, false, false,  (int)MatimgFieldIndex.MatCode, 25, 0, 0);
			this.AddElementFieldInfo("MatimgEntity", "MatImg", typeof(System.Byte[]), false, false, false, true,  (int)MatimgFieldIndex.MatImg, 1073741824, 0, 0);
		}
		/// <summary>Inits MatumEntity's FieldInfo objects</summary>
		private void InitMatumEntityInfos()
		{
			this.AddFieldIndexEnumForElementName(typeof(MatumFieldIndex), "MatumEntity");
			this.AddElementFieldInfo("MatumEntity", "Remarks", typeof(System.String), false, false, false, true,  (int)MatumFieldIndex.Remarks, 50, 0, 0);
			this.AddElementFieldInfo("MatumEntity", "UomCode", typeof(System.String), true, false, false, false,  (int)MatumFieldIndex.UomCode, 10, 0, 0);
			this.AddElementFieldInfo("MatumEntity", "UomDescription", typeof(System.String), false, false, false, false,  (int)MatumFieldIndex.UomDescription, 30, 0, 0);
		}
		/// <summary>Inits SystemuserEntity's FieldInfo objects</summary>
		private void InitSystemuserEntityInfos()
		{
			this.AddFieldIndexEnumForElementName(typeof(SystemuserFieldIndex), "SystemuserEntity");
			this.AddElementFieldInfo("SystemuserEntity", "IsInactive", typeof(System.Boolean), false, false, false, false,  (int)SystemuserFieldIndex.IsInactive, 0, 0, 0);
			this.AddElementFieldInfo("SystemuserEntity", "Password", typeof(System.String), false, false, false, false,  (int)SystemuserFieldIndex.Password, 20, 0, 0);
			this.AddElementFieldInfo("SystemuserEntity", "Rcpnl", typeof(System.Boolean), false, false, false, false,  (int)SystemuserFieldIndex.Rcpnl, 0, 0, 0);
			this.AddElementFieldInfo("SystemuserEntity", "UserCode", typeof(System.String), true, false, false, false,  (int)SystemuserFieldIndex.UserCode, 20, 0, 0);
			this.AddElementFieldInfo("SystemuserEntity", "UserRole", typeof(System.String), false, false, false, false,  (int)SystemuserFieldIndex.UserRole, 20, 0, 0);
		}
		/// <summary>Inits VendorEntity's FieldInfo objects</summary>
		private void InitVendorEntityInfos()
		{
			this.AddFieldIndexEnumForElementName(typeof(VendorFieldIndex), "VendorEntity");
			this.AddElementFieldInfo("VendorEntity", "AddressCity", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.AddressCity, 30, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "AddressCountry", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.AddressCountry, 30, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "AddressLine1", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.AddressLine1, 30, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "AddressLine2", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.AddressLine2, 30, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "AddressLine3", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.AddressLine3, 30, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "CheckName", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.CheckName, 80, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "CurrencyCodeFk", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.CurrencyCodeFk, 10, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "EmailAddress", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.EmailAddress, 40, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "FaxNo", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.FaxNo, 20, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "MobileNo", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.MobileNo, 20, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "Notes", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.Notes, 1073741824, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "OnHold", typeof(System.Boolean), false, false, false, false,  (int)VendorFieldIndex.OnHold, 0, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "PhoneNo1", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.PhoneNo1, 20, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "PhoneNo2", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.PhoneNo2, 20, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "PhoneNo3", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.PhoneNo3, 20, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "PtermCodeFk", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.PtermCodeFk, 10, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "ShortName", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.ShortName, 80, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "Tin", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.Tin, 25, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "Vatregistered", typeof(System.Boolean), false, false, false, false,  (int)VendorFieldIndex.Vatregistered, 0, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "VendorContractPerson", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.VendorContractPerson, 40, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "VendorContractPosition", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.VendorContractPosition, 40, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "VendorId", typeof(System.String), true, false, false, false,  (int)VendorFieldIndex.VendorId, 15, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "VendorName", typeof(System.String), false, false, false, false,  (int)VendorFieldIndex.VendorName, 80, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "VendorStatusCodeFk", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.VendorStatusCodeFk, 20, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "VendorTypeCodeFk", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.VendorTypeCodeFk, 20, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "Website", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.Website, 50, 0, 0);
			this.AddElementFieldInfo("VendorEntity", "ZipCode", typeof(System.String), false, false, false, true,  (int)VendorFieldIndex.ZipCode, 10, 0, 0);
		}
		/// <summary>Inits VenptermEntity's FieldInfo objects</summary>
		private void InitVenptermEntityInfos()
		{
			this.AddFieldIndexEnumForElementName(typeof(VenptermFieldIndex), "VenptermEntity");
			this.AddElementFieldInfo("VenptermEntity", "PtermCode", typeof(System.String), true, false, false, false,  (int)VenptermFieldIndex.PtermCode, 10, 0, 0);
			this.AddElementFieldInfo("VenptermEntity", "PtermDescription", typeof(System.String), false, false, false, false,  (int)VenptermFieldIndex.PtermDescription, 50, 0, 0);
		}
		/// <summary>Inits VwMaterialEntity's FieldInfo objects</summary>
		private void InitVwMaterialEntityInfos()
		{
			this.AddFieldIndexEnumForElementName(typeof(VwMaterialFieldIndex), "VwMaterialEntity");
			this.AddElementFieldInfo("VwMaterialEntity", "BrandCodeFk", typeof(System.String), false, false, false, false,  (int)VwMaterialFieldIndex.BrandCodeFk, 10, 0, 0);
			this.AddElementFieldInfo("VwMaterialEntity", "BrandDescription", typeof(System.String), false, false, false, false,  (int)VwMaterialFieldIndex.BrandDescription, 50, 0, 0);
			this.AddElementFieldInfo("VwMaterialEntity", "CritLevel", typeof(System.Single), false, false, false, false,  (int)VwMaterialFieldIndex.CritLevel, 0, 0, 24);
			this.AddElementFieldInfo("VwMaterialEntity", "InActive", typeof(System.Boolean), false, false, false, false,  (int)VwMaterialFieldIndex.InActive, 0, 0, 0);
			this.AddElementFieldInfo("VwMaterialEntity", "InvLevel", typeof(System.Single), false, false, false, false,  (int)VwMaterialFieldIndex.InvLevel, 0, 0, 24);
			this.AddElementFieldInfo("VwMaterialEntity", "LastModified", typeof(System.DateTime), false, false, false, false,  (int)VwMaterialFieldIndex.LastModified, 0, 0, 0);
			this.AddElementFieldInfo("VwMaterialEntity", "MatDescription", typeof(System.String), false, false, false, false,  (int)VwMaterialFieldIndex.MatDescription, 80, 0, 0);
			this.AddElementFieldInfo("VwMaterialEntity", "MaterialCode", typeof(System.String), true, false, false, false,  (int)VwMaterialFieldIndex.MaterialCode, 25, 0, 0);
			this.AddElementFieldInfo("VwMaterialEntity", "MatGrpCodeFk", typeof(System.String), false, false, false, false,  (int)VwMaterialFieldIndex.MatGrpCodeFk, 10, 0, 0);
			this.AddElementFieldInfo("VwMaterialEntity", "MatGrpDescription", typeof(System.String), false, false, false, false,  (int)VwMaterialFieldIndex.MatGrpDescription, 50, 0, 0);
			this.AddElementFieldInfo("VwMaterialEntity", "Remarks", typeof(System.String), false, false, false, false,  (int)VwMaterialFieldIndex.Remarks, 1073741824, 0, 0);
			this.AddElementFieldInfo("VwMaterialEntity", "ReOrderLevel", typeof(System.Single), false, false, false, false,  (int)VwMaterialFieldIndex.ReOrderLevel, 0, 0, 24);
			this.AddElementFieldInfo("VwMaterialEntity", "UmCodeFk", typeof(System.String), false, false, false, false,  (int)VwMaterialFieldIndex.UmCodeFk, 10, 0, 0);
			this.AddElementFieldInfo("VwMaterialEntity", "UomDescription", typeof(System.String), false, false, false, false,  (int)VwMaterialFieldIndex.UomDescription, 30, 0, 0);
			this.AddElementFieldInfo("VwMaterialEntity", "WdserialNo", typeof(System.Boolean), false, false, false, false,  (int)VwMaterialFieldIndex.WdserialNo, 0, 0, 0);
		}
		
	}
}




